<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f" %>
<div class="wrap J_check_wrap">
<div class="nav">
			<ul class="cc">
				<li class="current"><a href="${requestScope.FPWEB.rootPath }/banner/m/list${requestScope.FPWEB.urlStuff}">PC/移动端Banner</a></li>
				<li>
					<a class="btn mr10" href="${requestScope.FPWEB.rootPath }/banner/m/toinsert${requestScope.FPWEB.urlStuff}">添加Banner</a>
				</li>
				<li>
					<a href="${requestScope.FPWEB.rootPath }/banner/cache${requestScope.FPWEB.urlStuff}" class="btn">更新缓存</a>
				</li>
			</ul>
		</div>
	<form id="J_word_form" class="J_ajaxForm" method="post"
		  action="${requestScope.FPWEB.rootPath }/banner/m/update${requestScope.FPWEB.urlStuff}" autocomplete="off">
		<div class="table_list">
			<table width="100%">
				<thead>
					<tr>
						<td width="60"><label><input type="checkbox" class="J_check_all">全选</label></td>
						<td>标题</td>
						<td>Banner类型</td>
						<td>背景颜色</td>
						<td>PC图片地址</td>
						<td>ANDROID图片地址</td>
						<td>IOS图片地址</td>
						<td>链接地址</td>
						<td>排序</td>
						<td>操作</td>
					</tr>
				</thead>
				<tbody>
					<c:forEach items="${banner }" var="item">
					<tr>
						<td><input type="checkbox" name="banners[${item.banner_id}].banner_id" value="${item.banner_id }" class="J_check"></td>
						<td><input type="text" class="input length_2" name="banners[${item.banner_id}].title" value="${item.title }" /></td>
						<td><c:choose>
							<c:when test="${item.banner_type==1}">PC</c:when>
							<c:when test="${item.banner_type==2}">IOS</c:when>
							<c:when test="${item.banner_type==3}">ANDROID</c:when>
						</c:choose></td>
						<td><input type="text" class="input length_2" name="banners[${item.banner_id}].background" value="${item.background }" /></td>
						<td><input type="text" class="input length_2" name="banners[${item.banner_id}].pc_image_path" value="${item.pc_image_path }" /></td>
						<td><input type="text" class="input length_2" name="banners[${item.banner_id}].android_image_path" value="${item.android_image_path }" /></td>
						<td><input type="text" class="input length_2" name="banners[${item.banner_id}].ios_image_path" value="${item.ios_image_path }" /></td>
						<td><input type="text" class="input length_2" name="banners[${item.banner_id}].href" value="${item.href_path }" /></td>
						<td><input type="text" class="input length_2" name="banners[${item.banner_id}].sort" value="${item.sort }" /></td>
						<td><a class="btn btn_orange J_ajax_del" data-msg="确定删除该Banner？"
							href="${requestScope.FPWEB.rootPath }/banner/m/delete${requestScope.FPWEB.urlStuff}?banner_id=${item.banner_id }" id="J_ajax_del">删除</a></td>
					</tr>
					</c:forEach>
				</tbody>
			</table>
		</div>

		<div class="btn_wrap">
			<div class="btn_wrap_pd">
				<label class="mr20"><input type="checkbox" class="J_check_all">全选</label>
				<button class="btn btn_submit J_ajax_submit_btn" type="submit">保存</button>
			</div>
		</div>
	</form>
</div>